<?php TPL::output('m/header.tpl.htm'); ?>
<!-- 内容 -->
<div class="container padding-0">
    <div class="aw-people-income">
        <div class="mod-head integral-detail clearfix">
            <div class="title clearfix">
                <h1 class="pull-left">
                    <span>收益明细</span>
                </h1>
            </div>
        </div>
    </div>
    <div class="aw-income-box">
        <div class="tab-content">
            <div class="tab-pane active" id="income-sum">
                <div class="aw-income-list active">
                    <div class="mod-body">
                        <ul id="income-sum-listview">
                            <?php foreach ($this->integral_detail AS $key => $val) { ?>
                            <li>
                                <div class="mod-body" style="padding-top: 10px;">
                                    <p style="margin: 0 0 0 20px;padding: 5px 0;">
                                        <span>获取时间：</span><span><?php echo $val['integral_time']; ?></span>
                                    </p>
                                    <p style="margin: 0 0 0 20px;padding: 5px 0;">
                                        <span>获得币数：</span><?php echo $val['coin']; ?>
                                    </p>
                                    <p style="margin: 0 0 0 20px;padding: 5px 0;">
                                        <span>相关信息：</span><?php echo $val['note']; ?>
                                    </p>
                                </div>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                    <div class="mod-footer">
                        <a class="aw-load-more" id="load_join" data-page="2" auto-load="false"><i class="icon icon-loading icon-spin"></i> <span><?php _e('更多'); ?></span></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- end 内容 -->

<script type="text/javascript">
    $(function(){
        $("#load_join").click(function(){
            var _this = this;
            $(this).addClass('loading');
            var page = $(this).attr("data-page");
            var next_page = parseInt(page) + 1;
            $.ajax({
                type:'POST',
                url: G_BASE_URL + '/m/ajax/ajax_people_income_integral_detail/',
                data:{page:page},
                success:function(res){
                    if(res){
                        $("#income-sum-listview").append(res);
                        $("#load_join").attr("data-page",next_page);
                    }else{
                        alert("已经展示全部内容");
                    }
                    $(_this).removeClass('loading');
                }
            })
        });
    });



    var PEOPLE_USER_ID = '<?php echo $this->user['uid']; ?>';

    var ACTIVITY_ACTIONS = '<?php echo implode(',', array(
    ACTION_LOG::ADD_QUESTION,
        ACTION_LOG::ANSWER_QUESTION,
        ACTION_LOG::ADD_REQUESTION_FOCUS,
        ACTION_LOG::ADD_AGREE,
        ACTION_LOG::ADD_TOPIC,
        ACTION_LOG::ADD_TOPIC_FOCUS,
        ACTION_LOG::ADD_ARTICLE,
        ACTION_LOG::ADD_AGREE_ARTICLE,
        ACTION_LOG::ADD_COMMENT_ARTICLE
    )); ?>';

</script>

<?php TPL::output('m/footer.tpl.htm'); ?>